package com.sunxd.brvahexpandableproject;

import com.chad.library.adapter.base.entity.node.BaseExpandNode;
import com.chad.library.adapter.base.entity.node.BaseNode;

import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;
import java.util.List;

public class Material extends BaseExpandNode {
    private String name;
    private double price;
    private List<BaseNode> supplyData;

    public Material() {
        setExpanded(false);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public void setSupplyData(SupplyData d) {
        supplyData = new ArrayList<>();
        supplyData.add(d);
    }

    @Nullable
    @Override
    public List<BaseNode> getChildNode() {
        return supplyData;
    }
}
